﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Mt.Site.Core.WorkFlows.Enum;
using Mt.Site.Core.WorkFlows.Process.Entities;
using System;
using System.ComponentModel.DataAnnotations;

namespace Mt.Site.Core.WorkFlows.Process.Models
{
    [AutoMapFrom(typeof(WorkFlowPaper), typeof(WorkFlowPaperArchive))] 
    public class WorkFlowPaperDto : AuditedEntityDto<Guid>
    {
        public Guid WorkFlowId { get; set; }

        /// <summary>
        /// 当前所处步骤
        /// </summary>
        public Guid NodeId { get; set; }

        public PaperState PaperState { get; set; }

        [Required]
        [StringLength(WorkFlowPaper.MaxTitleLength)]
        public string Title { get; set; }

        public string UnitName { get; set; }

        //确定发文部门的值（主办部门）
        public long UnitId { get; set; }

        public string UnitCode { get; set; }

        /// <summary>
        /// 协办部门id
        /// </summary>
        public string CoOperativeUnitIds { get; set; }

        [StringLength(WorkFlowPaper.CoOperativeUnitIdsLength)]
        public string MainOperativeUserId { get; set; }

        [StringLength(WorkFlowPaper.CoOperativeUnitIdsLength)]
        public string CoOperativeUserIds { get; set; }


        [StringLength(WorkFlowPaper.CoOperativeUnitIdsLength)]
        public string CoOperativeUserIdsCopy { get; set; }

        /// <summary>
        /// 拟稿人名字
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 流水号
        /// </summary>
        public long SerialNumber { get; set; }

        /// <summary>
        /// 签发人
        /// </summary>
        public string Signer { get; set; }

        /// <summary>
        /// 文号
        /// </summary>
        public string ReferNumber { get; set; }

        /// <summary>
        /// 分发数量（备用）
        /// </summary>
        public int PrintCount { get; set; }


        public ApprovalResult ApprovalResult { get; set; }

        public ProgressState ProgressState { get; set; }

        public bool HasFinished { get; set; }

        public DateTime? DeadLineTime { get; set; }

        public DateTime RegistrationTime { get; set; }


        public int WhYear { get; set; }

        public int WhNumber { get; set; }

        public string WhName { get; set; }

        public Guid? WenHaoId { get; set; }
    }
}
